lib/checkout: add filter API to skip over files
authorJonathan Lebon <jlebon@redhat.com>
Thu, 1 Feb 2018 22:32:32 +0000 (22:32 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 6 Feb 2018 15:38:20 +0000 (15:38 +0000)
commit2e95e0661616786a0f7fc53fd6ce4504c7aecbe0
tree025cd785c687f212c4adfd006b7ae5b9b6b11c8c
parent6bed64764856a46dde0749ea68f4111d8ec34bdb
lib/checkout: add filter API to skip over files

This is analogous to the filtering support for the commit API: we allow
library users to skip over checking out specific files. This is useful
in some tricky situations where we *know* that the files to be checked
out will conflict with existing files in subtle ways.

One such example is in rpm-ostree support for multilib. There, we want
to allow checking out a package onto an existing tree, but skipping over
files that are not coloured to our preferred value (e.g. not overwriting
an i686 version of `ldconfig` if we already have the `x86_64` version).
See https://github.com/projectatomic/rpm-ostree/pull/1227 for details.

Closes: #1441
Approved by: cgwalters
src/libostree/ostree-core-private.h
src/libostree/ostree-core.c
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo.h
src/ostree/ot-builtin-checkout.c
tests/basic-test.sh
tests/installed/itest-label-selinux.sh